using Project3D.my3D.Base;
using System;
using System.Collections.Generic;

namespace Project3D.my3D.Geometric
{

    public class myLine3D
    {
        //Stored as a point p and a vector v. Then line is p+tv.
        public myPoint3D p;
        public myVector3D v;

        //returns the point p + tv, where t is the argument of the function.
        public myPoint3D pointat(double t)
        {
            myPoint3D result = new myPoint3D();

            result.X = p.X + t * v.dX;
            result.Y = p.Y + t * v.dY;
            result.Z = p.Z + t * v.dZ;

            return result;
        }

        public myLine3D()
        {
            this.p = new myPoint3D();
            this.v = new myVector3D();
        }

        public myLine3D(myPoint3D _p, myVector3D _v)
        {
            this.p = _p;
            this.v = _v;
        }
    }

}

